﻿/**************************************************************
 * St. Sana - A file/folder scanner originall designed for    *
 * Open Media Library (open-media-library.googlecode.com)     *
 *                                                            *
 * Available for use by ANY project that wants to use it.     *
 * St. Sana is covered by the Apache 2 license.               *
 * Feel free to use this software however you like so as long *
 * as you follow the guidelines of above mentioned license.   *
 * Written by David J. Shultz (djshultz@gmail.com)            *
 **************************************************************/

using System;
using System.Collections.Generic;
using NUnit.Framework;

using StSana;

namespace StSanaTestSuite
{
    [TestFixture]
    public class TVideo
    {
        [Test]
        public void TEST_BASIC_VIDEO_USAGE()
        {
            Video video = new Video();
            video.Name = "MyMovie.mkv";

            Assert.IsInstanceOfType(typeof(Video), video);

            Assert.AreEqual("MyMovie.mkv", video.Name);
        }

        [Test]
        public void TEST_VIDEO_OBJECTS_CONTAIN_A_LIST_OF_FILENAMES()
        {
            Video v = new Video();
            v.Name = "My Movie";
            v.AddFile("c:\\myfile1.avi");
            v.AddFile("c:\\myfile2.avi");

            Assert.AreEqual(2, v.FileCount);
            Assert.AreEqual("c:\\myfile1.avi", v.GetFileNameAtIndex(0));
            Assert.AreEqual("c:\\myfile2.avi", v.GetFileNameAtIndex(1));
            Assert.AreEqual(null, v.GetFileNameAtIndex(2));

            Assert.IsInstanceOfType(typeof(IList<string>), v.Files);
        }
    }
}
